package yunquan.wang.modules.base.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import yunquan.wang.base.domain.IdEntity;

/**
 * 行政职务
 * 
 * @author Administrator
 * 
 */
@Entity
@Table(name = "BASE_POSITION")
public class Position extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -7271546787472110958L;
	@Column(name = "NAME")
	private String name;// 职务名称
	@Column(name = "INFO")
	private String info;// 职务说明
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PK_ADMINRANK")
    private AdminRank adminRank;
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "position")
	private Set<UserBasic> userBasics=new HashSet<UserBasic>();
	
	
	public Set<UserBasic> getUserBasics() {
		return userBasics;
	}
	public void setUserBasics(Set<UserBasic> userBasics) {
		this.userBasics = userBasics;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getInfo() {
		return info;
	}
	public void setInfo(String info) {
		this.info = info;
	}
	public AdminRank getAdminRank() {
		return adminRank;
	}
	public void setAdminRank(AdminRank adminRank) {
		this.adminRank = adminRank;
	}

}
